
 <template>
 	<el-dialog title="" visible :show-close="false" :modal-append-to-body="false" class="wrap" size="tiny">
 		<i class="el-icon-close close" @click="cancel" style="color: white;z-index:10;"></i>
		 <div class="bt">休学</div>
 		 <p>确认是否办理休学</p>
 		<el-button type="info" class="submit" @click="submit">确认</el-button>
 		<el-button type="info" class="submit" @click="cancel">取消</el-button>
 	</el-dialog>
 </template>
 <script type="text/javascript">
 	import qs from 'qs'
 	export default {
 		props: ['params'],
 		data() {
 			return {
 				ifxs:'Y',
 				id:'',
 			}
 		},
 		created() {
  		 this.id = this.params.row.id;
       // alert(this.params.row.id)
 		},
 		methods: {

 			 submit() {
 				//检测
        // alert(this.params.row.id)
 				// this.$store.state.loading = true;
 				//装载数据
 				var logininfo = JSON.parse(localStorage.logininfo);
 				var params2 = qs.stringify({
 						id: this.id,
 						yhid: logininfo.id,
 						xxid: logininfo.xxid,
            ifxs:this.ifxs
 					})
 				//执行
 				    this.axios.post(this.$store.state.api + 'xs/updatexs',  params2 )
 						.then(res => {
 								this.$emit('close', { type: 'xiuxue', cancel: false });
 								// this.$store.state.loading = false;
 						}).catch(res => {
 							this.$message.warning("服务器异常");
 							// this.$store.state.loading = false;
 						})
 			},
 			cancel() {
 				this.$emit('close', { type: 'xiuxue', cancel: true })
 			}
 		}
 	}
 </script>
 <style lang="less" scoped>
 .wrap {
   text-align: center;
 }
 p{
   font-size: 30px;
   color: red;
   margin: 40px 0 40px 0;
 }
 .bt{
     position: absolute;
     width: 100%;
     height: 50px;
     margin: 0 auto;
     top: 0;
     left: 0;
     background: #50BFFF;
     color:white;
     text-align:left;
     line-height: 50px;
     font-size: 17px;
     padding-left: 15px;
   }

 .form {
   text-align: left;
   margin-top: 20px;
 }
  .input {
           width: 300px;
           display: inline-block;
       }

 .select-block {
   display: block;
   width: 85%;
 }

 .submit {
   width: 120px;
 }
 </style>
